<template>
    <panel title="理财精选" :cname="$style.panel">
        <section :class="$style.content">
            <dl v-for="item in items" :key="item.title" :class="$style.item">
                <dt>{{item.title}}<span>{{item.sub}}</span></dt>
                <dd>{{item.rate}}</dd>
                <dd>{{item.text}}</dd>
            </dl>
        </section>
    </panel>
</template>

<script>
import Panel from '../core/panel'
export default {
    name: 'moneyMoney',
    components: {
        Panel
    },
    data () {
        return {
            items:[{
                title: '定期理财',
                sub: '理财首选',
                rate: '5.60%',
                text: '历史年化回报率'
            }, {
                title: '小白理财',
                sub: '理财首选',
                rate: '4.22%',
                text: '7日年化收益率'
            }, {
                title: '月月盈',
                sub: '养老保障',
                rate: '5%',
                text: '七日年化收益率'
            }, {
                title: '小白基金',
                sub: '天天赚钱',
                rate: '4.27%',
                text: '7日年化收益率'
            }]
        }
    }
}
</script>

<style lang="scss" module>
    @import '../../css/element.scss';
    .panel{
        .content{
            @include list(row);
            justify-content: space-around;
            &:after{
                content: '';
                display: block;
                position: relative;
                width: 100%;
                height: 0;
                border-bottom: 1px solid #eee;
                margin-top: -208px;
            }
            .item{
                position: relative;
                width: 50%;
                box-sizing: border-box;
                padding: 34px 16px;
                &:after{
                    content:' ';
                    position: absolute;
                    right: 0;
                    width: 1px;
                    height: 136px;
                    display: block;
                    top: 50%;
                    transform: translate(0 , -50%);
                    border-right: 1px solid #eee;
                }
                &:nth-of-type(2n){
                    &::after{
                        display: none;
                    }
                }
                dt{
                    font-size: 30px;
                    line-height: 42px;
                    color: #333;
                    font-weight: 700;
                    span{
                        font-size: 22px;
                        color: #ff5155;
                        border: 1px solid #ff5155;
                        padding: 0 8px;
                        vertical-align: 1px;
                        margin-left: 2px;
                    }
                }
                dd{
                    &:first-of-type{
                        font-weight: 700;
                        font-size: 44px;
                        height: 58px;
                        line-height: 58px;
                        color: #FF5155;
                        white-space: nowrap;
                        text-overflow: ellipsis;
                        overflow: hidden;
                    }
                    &:last-of-type{
                        font-size: 24px;
                        height: 34px;
                        line-height: 34px;
                        color: #999;
                        white-space: nowrap;
                        text-overflow: ellipsis;
                        overflow: hidden;
                    }
                }
                
            }
        }
    }
</style>